package packVistas;

import java.awt.BorderLayout;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.RowSpec;
import com.jgoodies.forms.factories.FormFactory;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class GestionarIncidencias extends JDialog {

	private final JPanel contentPanel = new JPanel();
	private int idArbitro;

	public GestionarIncidencias(int pIdArbitro) {
		idArbitro = pIdArbitro;
		setTitle("Gestionar Incidencias");
		setResizable(false);
		setModal(true);
		setBounds(100, 100, 197, 211);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(new FormLayout(new ColumnSpec[] {
				FormFactory.RELATED_GAP_COLSPEC,
				ColumnSpec.decode("default:grow"),
				FormFactory.RELATED_GAP_COLSPEC,},
			new RowSpec[] {
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.MIN_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,}));
		{
			JButton cmdConsultar = new JButton("Gestion de cambios");
			cmdConsultar.addMouseListener(new MouseAdapter() {
				@Override
				public void mouseClicked(MouseEvent arg0) {
					GestionCambios gc = new GestionCambios(idArbitro);
					gc.setVisible(true);
					
				}
			});
			contentPanel.add(cmdConsultar, "2, 2");
		}
		{
			JButton btnNewButton_1 = new JButton("Gestion de goles");
			btnNewButton_1.addMouseListener(new MouseAdapter() {
				@Override
				public void mouseClicked(MouseEvent e) {
					GestionGoles gg = new GestionGoles(idArbitro);
					gg.setVisible(true);
					
				}
			});
			contentPanel.add(btnNewButton_1, "2, 4");
		}
		{
			JButton btnGestionDeTarjetas = new JButton("Gestion de tarjetas");
			btnGestionDeTarjetas.addMouseListener(new MouseAdapter() {
				@Override
				public void mouseClicked(MouseEvent e) {
					GestionTarjetas gt = new GestionTarjetas(idArbitro);
					gt.setVisible(true);
					
				}
			});
			contentPanel.add(btnGestionDeTarjetas, "2, 6");
		}
		{
			JButton btnGestionDeAplazamientos = new JButton("Gestion de aplazamientos");
			btnGestionDeAplazamientos.addMouseListener(new MouseAdapter() {
				@Override
				public void mouseClicked(MouseEvent e) {
					GestionAplazamientos ga = new GestionAplazamientos(idArbitro);
					ga.setVisible(true);
					
				}
			});
			contentPanel.add(btnGestionDeAplazamientos, "2, 8");
		}
		{
			JButton btnNewButton = new JButton("Cerrar");
			btnNewButton.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {
					dispose();
				}
			});
			contentPanel.add(btnNewButton, "2, 12");
		}
	}

}
